{% extends "base/base.html" %}

{% import "macro/display.html" as display %}

{% block title %}{{ gettext("Tag") }} {{ tag|e }}{% endblock %}

{% block main %}
<h2>{{ gettext("Info for tag(s)") }} "{{ tag|e }}"</h2>
<p>{{ gettext("Related tags") }}:</p>
{% for tagd in related %}
    <span class="tagview_{{ tagd.font_size }}">
        <a href="{{ url("dv-tagdetail", mkstr(tag|e,",",tagd|e)) }}" title='Add tag "{{ tagd|e }}" to filter' class="tag_add">[+]</a>
        <span title="{{ tagd.count }} song(s) tagged">
            {{ display.tag(tagd) }}
        </span>
        {% if not loop.last %}, {% endif %}
    </span>
{% endfor %}
<h2>{{ gettext("Songs connected to tags") }}</h2>

{% set objs, paging = dv.paginate(songs, 300) %}

{% include "webview/t/songheader.html" %}
{% for song in objs  %}
<tr class="{{ loop.cycle('row1', 'row2') }}">
{% include "webview/t/songlist.html" %}
</tr>
{% endfor %}
</table>

{{ paging }}

{% endblock %}
